{include file='admin/before_body.phtml' title='后台首页'}
{include file='admin/header.phtml'}
    <div class="main-container" id="main-container">
      <script type="text/javascript">try { ace.settings.check('main-container' , 'fixed') }catch(e) {  }</script>
      <div class="main-container-inner">
        {include file='admin/sidebar.phtml' navigation='dashboard'}
        <div class="main-content">
{$breadcrumbs=[]}
{$breadcrumbs[] = ['name' => '控制台', 'link' => url('admin')]}
{$breadcrumbs[] = ['name' => '个人信息', 'isactive' => true]}
{include file='admin/breadcrumb.phtml' breadcrumbs=$breadcrumbs}
{$infoUser = $smarty.session['infoUser']['data']|default:null}
          <div class="page-content">
            {html_messages}
            <div class="page-header"><h1>个人资料</h1></div>
            <div class="row">
<div class="col-xs-12">
  <div class="user-profile row">
    <div class="col-xs-12 col-sm-offset-2 col-sm-3 center">
      <div>
        <span class="profile-picture">
          <img id="avatar" class="editable img-responsive" src="{$infoUser['avatar']|default:$user->avatar}" />
        </span>
      </div>
    </div>
    <div class="col-xs-12 col-sm-7">
      <form class="form-horizontal" role="form" id="addform" method="POST">
        <input type="text" name="avatar" id="avatarback" hidden value="{$infoUser['avatar']|default:$user->avatar}">
        <div class="form-group">
          <label class="col-sm-2 control-label no-padding-right"> 用户名 </label>
          <div class="col-sm-10">
            <input type="text" class="col-xs-10 col-sm-5" value="{$user->username}" disabled>
          </div>
        </div>
        <div class="space-4"></div>
        <div class="form-group">
          <label class="col-sm-2 control-label no-padding-right"> 昵称 </label>
          <div class="col-sm-10">
            <input type="text" class="col-xs-10 col-sm-5" name="nickname" value="{$infoUser['nickname']|default:$user->nickname}">
          </div>
        </div>
        <div class="space-4"></div>
        <div class="form-group">
          <label class="col-sm-2 control-label no-padding-right"> 密码 </label>
          <div class="col-sm-10">
            <input type="password" class="col-xs-10 col-sm-5" name="password" value="{$infoUser['password']|default:''}">
          </div>
        </div>
        <div class="clearfix form-actions" style="background: none;border-top: none;">
          <div class="col-md-offset-2 col-md-10">
            <button class="btn" type="reset">
              <i class="icon-undo bigger-110"></i>
              清空
            </button>
            <button class="btn btn-info" type="submit">
              <i class="icon-edit bigger-110"></i> 保存
            </button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>







</div><!-- /.col -->






            </div>
          </div>
        </div>
      </div>
    </div>
</body>
{include file='admin/after_body.phtml'}
{include file='admin/upload_image.phtml' showid="avatar" callbackid="avatarback" btnchoose="上传用户头像" type="adminhead"}


<script type="text/javascript">
  $('#addform').on('reset', function() {
    $('input[name="avatar"]').change();
  });
  $('#addform').submit(function(e) {
    var data = LIVE.component.form.getData($(this));
    if (!data['avatar']) { return alert('请上传用户头像') || e.preventDefault();}
    data['nickname'] = data['nickname'] || data['username'];
  });

</script>

</html>

